package com.springcloud.sc.ucpv5.client.commondata.data;

import com.springcloud.sc.ucpv5.client.commondata.datachange.DataExChange;

/**
 * Generated from IDL struct "UserQueryRsp".
 *
 * @author JacORB IDL compiler V 2.3-beta-2, 14-Oct-2006
 * @version generated at 2014-10-29 11:48:54
 */

public final class UserQueryRsp extends DataExChange {
    public UserQueryRsp() {
    }

    public int Result;
    public com.springcloud.sc.ucpv5.client.commondata.data.User[] UserList;

    public UserQueryRsp(int Result, com.springcloud.sc.ucpv5.client.commondata.data.User[] UserList) {
	this.Result = Result;
	this.UserList = UserList;
    }

    /**
     * 从probuf对象获取当前对象
     * 
     * @param builder_src
     * @return
     */
    public void dataChangeProBufDataToCommon(com.google.protobuf.Message builder_src) {
	try {
	    com.proto.uuos_sdk_pb.UserQueryRsp builder_dst = (com.proto.uuos_sdk_pb.UserQueryRsp) builder_src;
	    Result = builder_dst.getResult();
	    UserList = new com.springcloud.sc.ucpv5.client.commondata.data.User[builder_dst.getUserListCount()];

	    for (int i = 0; i < builder_dst.getUserListCount(); i++) {
		UserList[i] = new com.springcloud.sc.ucpv5.client.commondata.data.User();
		UserList[i].dataChangeProBufDataToCommon(builder_dst.getUserList(i));
	    }
	} catch (Exception e) {
	    e.printStackTrace();
	}
    }
}
